jQuery(document).ready(function(){});

function deleteImages(){
	jQuery('a#deleteImg').click(function(){
		var id = jQuery(this).attr('href');
		var pid = jQuery(this).attr('name');
		id = parseInt(id);
		pid = parseInt(pid);
		// Call ajax delete image attach file
		var x = new Ajax();
		x.get('shop.php?mod=ajax&ac=deleteattach&inajax=yes&id=' + id + (pid ? '&pid='+pid : ''), function(data){
			if (data == 'deleted'){
				jQuery('li#li_' + id).remove();
			}
		});

		return false;
	});
}